/*  ----------------------------------------------------------------------
  DOM BUILDER SHORTCUT
  example:  $E('div', $E('p', 'hellooooo'), {id:'comment', class:'top'});
  ---------------------------------------------------------------------- */
var $E = function() {
  var args = $A(arguments);
  var tag = args.shift();
  if (tag == 'text') return document.createTextNode(args[0]);
  if (args.length > 1 && args[args.length - 1].constructor == Object) {
    options = args.pop();
  }
  else {
    options = {};
  }
  var element = new Element(tag, options);
  if (args.length > 0) {
    for (var i=0; i < args.length; i++) {
      if (typeof args[i] == 'string') args[i] = $E('text', args[i]);
      element.appendChild(args[i]);
    };
  }
  return element;
};